package cn.kgm.user.dto.entity;

import cn.kgm.core.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * # 技术改变自己 #
 * 用户账户表
 * @author kappi
 * @date   2024-04-08 13:28:48
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName(value = "user_account")
@ApiModel(value = "UserAccount", description = "用户账户表")
public class UserAccount extends Entity<Long>{

    /**
     * 用户ID:[user.id]
     */
    @ApiModelProperty(value = "用户ID:[user.id]")
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 账户类型:[PHONE,手机号];[EMAIL,邮箱]
     */
    @ApiModelProperty(value = "账户类型:[PHONE,手机号];[EMAIL,邮箱]")
    @TableField(value = "type", condition = LIKE)
    private String type;

    /**
     * 登录账号
     */
    @ApiModelProperty(value = "登录账号")
    @TableField(value = "value", condition = LIKE)
    private String value;

    /**
     * 密码加密CODE
     */
    @ApiModelProperty(value = "密码加密CODE")
    @TableField(value = "salt", condition = LIKE)
    private String salt;

    /**
     * 加密密码
     */
    @ApiModelProperty(value = "加密密码")
    @TableField(value = "password", condition = LIKE)
    private String password;

    /**
     * 是否密码锁定区间:[0,未锁定];[1,锁定]
     */
    @ApiModelProperty(value = "是否密码锁定区间:[0,未锁定];[1,锁定]")
    @TableField(value = "pass_lock")
    private Boolean passLock;

    /**
     * 密码锁定结束时间
     */
    @ApiModelProperty(value = "密码锁定结束时间")
    @TableField(value = "lock_end_time")
    private LocalDateTime lockEndTime;
}
